//
// Created by kqbi on 2020/2/12.
//

#ifndef ILPR_UTIL_H
#define ILPR_UTIL_H

#include <string>
#include <vector>

#if defined(_WIN32)
#ifndef PATH_MAX
#define PATH_MAX 1024
#endif // !PATH_MAX
#endif // defined(_WIN32)

/* Status Codes */
#define VIICS_STATUS_MAP(XX)                                                               \
    XX(0,   OK,                                         OK)                                \
    XX(512, PARAM_ERROR,                                Param Error)                         \

enum VIICS_status {
#define XX(num, name, string) VIICS_STATUS_##name = num,
    VIICS_STATUS_MAP(XX)
#undef XX
};

const char *getIPOSSStatusStr(enum VIICS_status s);

std::string exePath();

std::string exeDir();

std::string exeName();

std::string getTimeStr(const char *fmt, time_t time = 0);

bool GetAllFiles(std::vector<std::string>& vecFiles, std::string iPath, bool bRecursive);

bool IsImageGDIPLUSValid(std::string filePath);
#endif //ILPR_UTIL_H
